package com.nf.xiaomi.service;

import com.nf.xiaomi.entity.EvaluateEntity;
import com.nf.xiaomi.entity.OrderEntity;

import java.time.LocalDateTime;
import java.util.List;

public interface EvaluateService {
    List<EvaluateEntity> getAll();

    List<EvaluateEntity> getAll(Long account);

    List<EvaluateEntity> getAll(Integer evaluateID);

    int insert(Integer orderDetailsId,String evaluateContent, LocalDateTime evaluateDate, Integer nstate);

    int update(String evaluateContent, LocalDateTime evaluateDate, Integer evaluateId);

    int delete(Integer evaluateId);

    default Integer[] getDetailIds(List<EvaluateEntity> evaluateEntityList){
        Integer[] ids=new Integer[evaluateEntityList.size()];
        for (int i = 0; i < evaluateEntityList.size(); i++) {
            ids[i]=evaluateEntityList.get(i).getProductDetailID();
        }
        return ids;
    }
}
